package engine.game.physicalObjects;

import java.awt.Rectangle;

/**
 * abstract class to represent the commons behaviors of all the 
 * physical objects in this game
 * @author LeoJ
 *
 */
public abstract class PhysicalObject {
	/* *********************************************************
	 * Attributes
	 * ********************************************************* */
	protected Rectangle _engloberRect;
	//no need of a position attribute --> the rectangleClass already
	//have one...
	
	/* *********************************************************
	 * Instance Methods
	 * ********************************************************* */
	public Rectangle getEngloberRect(){
		return _engloberRect;
	}
	
	public boolean isIntersectedBy(PhysicalObject phy){
		return this._engloberRect.intersects(phy._engloberRect);
	}
	public abstract void handleIntersectionWith(PhysicalObject phy);

}
